﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace FILSTARTUPS_MOBILE.Models
{
    public class Member
    {
        [Key]
        public int memberidPK { get; set; }

        [Column]
        public string emailaddress { get; set; }
       
        [Column] 
        public string confirmemailaddress { get; set; }
       
        [Column]
        public string password { get; set; }
       
        [Column]
        public string confirmpassword { get; set; }

        [Column]
        public bool member_flag { get; set; }
        
        public int roleidFK { get; set; }
        
        [Column]
        public DateTime datejoined { get; set; }
       
        [Column]
        public string validationcode { get; set; }
        
        [Column]
        public string secretanswer { get; set; }

        [Column]
        public string secretquestion { get; set; }
    }

    public class RegistrationModel
    {
        [Remote("EmailExists", "Home", "Username is already been taken.")]
        [Display(Name = "Email Address")]
        public string emailaddress { get; set; }

        [Display(Name = "Confirm Email Address")]
        public string confirmemailaddress { get; set; }

        [Display(Name = "Password")]
        [DataType(DataType.Password)]
        public string password { get; set; }

        [Display(Name = "Confirm Password")]
        [DataType(DataType.Password)]
        public string confirmpassword { get; set; }

        [Display(Name="Firstname")]
        public string firstname { get; set; }
        [Display(Name="Lastname")]
        public string lastname { get; set; }
        [Display(Name="Gender")]
        public string gender { get; set; }

        [Display(Name="Birtdate")]
        public DateTime birthdate { get; set; }

        [Display(Name="Secret Question")]
        public string secretquestion { get; set; }

        [Display(Name="Secret Answer")]
        public string secretanswer { get; set; }
 
        //  public string firstname { get; set; }
        //  public string lastname { get; set; }
        //  public string gender {get;set;}

    }

    public class LoginModel
    {
        [Display(Name = "Email Address")]
        [DataType(DataType.EmailAddress)]
        public string emailaddress { get; set; }

        [Display(Name = "Password")]
        [DataType(DataType.Password)]
        public string password { get; set; }
    }

    public class ChangePasswordModel
    {
        [Display(Name = "Current Password")]
        [DataType(DataType.Password)]
        public string password { get; set; }

        [Display(Name = "New Password")]
        [DataType(DataType.Password)]
        public string newpassword { get; set; }

        [Display(Name = "Re-type New Password")]
        [DataType(DataType.Password)]
        [Compare("newpassword", ErrorMessage="Password didn't match")]
        public string retypenewpassword { get; set; }
    }
    public class ForgotPasswordModel
    {
        [Display(Name="Email Address")]
        [DataType(DataType.EmailAddress)]
        [Required(ErrorMessage="Email Address is required")]
        public string emailaddress { get; set; }

        [Display(Name = "Confirm Email Address")]
        [DataType(DataType.EmailAddress)]
        [Required(ErrorMessage = "Confirm Email Address is required")]
        public string confirmemailaddress { get; set; }

        [Display(Name="Secret Question")]
        [Required(ErrorMessage="Secret Question is required")]
        public string secretquestion { get; set; }

        [Display(Name="Secret Answer")]
        [Required(ErrorMessage="Secret Answer is required")]
        public string secretanswer { get; set; }

    }
    public class ForumThreadMember
    {
        public string forumtitle { get; set; }
        public string forumdescription { get; set; }
        public DateTime dateposted { get; set; }
        public string membername { get; set; }
        public int forumthreadidPK { get; set; }
    }
}